Optimal. Leaf size=23 \[ \frac{\cos (a+b x)}{b}-\frac{\tanh ^{-1}(\cos (a+b x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0147569, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2592, 321, 206} \[ \frac{\cos (a+b x)}{b}-\frac{\tanh ^{-1}(\cos (a+b x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2592
Rule 321
Rule 206
Rubi steps
\begin{align*} \int \cos (a+b x) \cot (a+b x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=\frac{\cos (a+b x)}{b}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac{\tanh ^{-1}(\cos (a+b x))}{b}+\frac{\cos (a+b x)}{b}\\ \end{align*}
Mathematica [A] time = 0.0154529, size = 42, normalized size = 1.83 \[ \frac{\cos (a+b x)}{b}+\frac{\log \left (\sin \left (\frac{1}{2} (a+b x)\right )\right )}{b}-\frac{\log \left (\cos \left (\frac{1}{2} (a+b x)\right )\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 32, normalized size = 1.4 \begin{align*}{\frac{\cos \left ( bx+a \right ) }{b}}+{\frac{\ln \left ( \csc \left ( bx+a \right ) -\cot \left ( bx+a \right ) \right ) }{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.977233, size = 46, normalized size = 2. \begin{align*} \frac{2 \, \cos \left (b x + a\right ) - \log \left (\cos \left (b x + a\right ) + 1\right ) + \log \left (\cos \left (b x + a\right ) - 1\right )}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60282, size = 115, normalized size = 5. \begin{align*} \frac{2 \, \cos \left (b x + a\right ) - \log \left (\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) + \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right )}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.07189, size = 92, normalized size = 4. \begin{align*} \begin{cases} \frac{\log{\left (\tan{\left (\frac{a}{2} + \frac{b x}{2} \right )} \right )} \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )}}{b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + b} + \frac{\log{\left (\tan{\left (\frac{a}{2} + \frac{b x}{2} \right )} \right )}}{b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + b} + \frac{2}{b \tan ^{2}{\left (\frac{a}{2} + \frac{b x}{2} \right )} + b} & \text{for}\: b \neq 0 \\\frac{x \cos ^{2}{\left (a \right )}}{\sin{\left (a \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21611, size = 77, normalized size = 3.35 \begin{align*} -\frac{\frac{4}{\frac{\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 1} - \log \left (\frac{{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right )}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]